(*---------------------------------------------------------------------------
    :Program.    ArraySort.def
    :Author.     Bernd Preusing
    :Address.    Gerhardstr. 16  D-2200 Elmshorn
    :Phone.      04121/22486
    :Shortcut.   [bep]
    :Version.    1.0
    :Date.       21-Oct-88
    :Copyright.  PD
    :Language.   Modula-II
    :Translator. M2Amiga
    :Imports.    ---
    :UpDate.     
    :Contents.   universal array sorter
    :Remark.     Sortiert einen Array in aufsteigender Reihenfolge.
---------------------------------------------------------------------------*)
DEFINITION MODULE ArraySort;

FROM SYSTEM IMPORT ADDRESS;

 TYPE
   prLess = PROCEDURE(ADDRESS,ADDRESS):BOOLEAN;
   (* returns TRUE, if item at 1st ADDRESS < item at 2nd ADDRESS *)
   (* TRUE if 1st > 2nd : sorting in descending order *)

PROCEDURE Sort (VAR arr:ARRAY OF ADDRESS; (* eg POINTER TO RECORD or number *)
		count:LONGINT;		  (* count>0 *)
                less: prLess);		  (* PROCEDURE called by Sort *)

END ArraySort.def
